package com.github.aloxc.plugin.restplus.listener;

import com.github.aloxc.plugin.restplus.i18n.I18Bundle;
import com.github.aloxc.plugin.restplus.component.Dialog;
import com.github.aloxc.plugin.restplus.component.Postman;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.IconLoader;

import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
 *
 * @author leero
 */
public class PostmanListener extends MouseAdapter {
    private Project project;
    public PostmanListener(Project project) {
        this.project = project;
    }

    @Override
    public void mouseClicked(MouseEvent event) {
        Postman postman = new Postman();
        postman.setMaximumSize(new Dimension(700,150));
        postman.setMinimumSize(new Dimension(700,150));
        postman.setPreferredSize(new Dimension(700,150));
        com.github.aloxc.plugin.restplus.component.Dialog dialog = new Dialog(null, postman,
                new Dimension(500,150),
                new Dimension(500,150),
                new Dimension(500,150),
                IconLoader.getIcon("/icons/postman.png"),
                I18Bundle.getMessage("com.github.aloxc.plugin.restplus.postman.title")
        );
        dialog.setVisible(true);
    }
}
